<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="css/css.css">
    <link rel="stylesheet" href="css/style.css">
    <script src="http://apps.bdimg.com/libs/jquery/1.10.1/jquery.min.js"></script>
    <script type="text/javascript">
        !window.jQuery && document.write('<script src="js/jquery.min.js"><\/script>');
    </script>
    <script src="js/public.js"></script>
    <script src="js/area.js"></script>
    <script src="js/hospital.js"></script>
    <title>云中宝</title>
</head>

<body>
<div class="wrapper">
<div class="header">
    <ul class='clearfix'>
        <li class="header_btn_wrapper float_l"><a href="javascript:goHistory()" class="header_btn"><img src="images/return_icon.png" alt=""></a></li>
        <li class="header_btn_wrapper float_r"><a href="javascript:goHome()" class="header_btn"><img src="images/home_icon.png" alt=""></a></li>
        <li class="header_title_wrapper">定点医院</li>
    </ul> 
</div>
<div class="main pd10">
    <div class="content_wrapper">
        <div class="form_item_group">
            <div class="form_item">
               <div class="form_input_wrapper w_10">    
                <p class="form_text">参保地：北京市</p>
               </div>
            </div>
            <div class="form_item">
               <div class="form_input_wrapper w_10">    
                <select id="s_county" name="s_county" class="form_select w_10">
                
                </select>
               </div>
            </div>
        </div>
        <div class="form_item_group hospital_change">
<!--
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10">
                        <option value="" selected>东直门医院</option>
                        <option value="" >积水潭医院</option>
                        <option value="" >协和医院</option>
                        <option value="" >同仁医院</option>
                        <option value="" >中医药大学第三附属医院</option>
                    </select> 
                </div>         
            </div>
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10">
                        <option value="" >东直门医院</option>
                        <option value="" selected>积水潭医院</option>
                        <option value="" >协和医院</option>
                        <option value="" >同仁医院</option>
                        <option value="" >中医药大学第三附属医院</option>
                    </select> 
                </div>         
            </div>
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10">
                        <option value="" >东直门医院</option>
                        <option value="" >积水潭医院</option>
                        <option value="" selected>协和医院</option>
                        <option value="" >同仁医院</option>
                        <option value="" >中医药大学第三附属医院</option>
                    </select> 
                </div>         
            </div>
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10">
                        <option value="" >东直门医院</option>
                        <option value="" >积水潭医院</option>
                        <option value="" >协和医院</option>
                        <option value="" selected>同仁医院</option>
                        <option value="" >中医药大学第三附属医院</option>
                    </select> 
                </div>         
            </div>
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10">
                        <option value="" >东直门医院</option>
                        <option value="" >积水潭医院</option>
                        <option value="" >协和医院</option>
                        <option value="" >同仁医院</option>
                        <option value="" selected>中医药大学第三附属医院</option>
                    </select> 
                </div>         
            </div>
-->
            
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10" id="h1">
                        
                    </select> 
                </div>        
            </div>
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10" id="h2">
                    </select> 
                </div>         
            </div>
            
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10" id="h3">
                    </select> 
                </div>         
            </div>
            
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10" id="h4">
                    </select> 
                </div>         
            </div>
            
            <div class="form_item">
                <div class="form_input_wrapper w_10">
                    <select name="" class="form_select w_10" id="h5">
                    </select> 
                </div>         
            </div>
        </div>
        <span class="font_999">注：每月25日前的修改次月生效，每月25日后的修改下下月生效</span>
        <div class="form_item mg_t20">
            <a class="btn btn_lg bg_orange w_10" href="javascript:goHistory()">确认</a>      
        </div>
    </div>    
</div> 
</div>
<div class="footer">
    <ul class="toolbar">
        <li class="account active"><a href="javascript:void(0)"><p>我的账户</p></a></li>
        <li class="transact"><a href="javascript:void(0)"><p>我要办理</p></a></li>
        <li class="info"><a href="javascript:void(0)"><p>服务信息</p></a></li>
        <li class="setting"><a href="javascript:void(0)"><p>个人设置</p></a></li>
    </ul>
</div>
</div>
<script type="text/javascript">
$(function(){
    var h1=document.querySelector('#h1')
    var h2=document.querySelector('#h2')
    var h3=document.querySelector('#h3')
    var h4=document.querySelector('#h4')
    var h5=document.querySelector('#h5')
    var hos=['东直门医院','积水潭医院','协和医院','同仁医院','中医药大学第三附属医院']
    addHospital(h1,hos[0],hos)
    addHospital(h2,hos[1],hos)
    addHospital(h3,hos[2],hos)
    addHospital(h4,hos[3],hos)
    addHospital(h5,hos[4],hos)
    
    $('.form_item select').each(function(e){
        $(this).change(function(){  
              hos[e]=$(this).val()
              var k = $(this).parents('.form_item').siblings('.form_item').find('select');
              k.each(function(e){
                  delHospitals($(this)[0])
                  addHospital($(this)[0],hos[($(this)[0].id.slice(1))-1],hos)
              }) 
        })
    })
    
})

</script> 
  
</body>
</html>